#ifndef _OPERATOR_H_
#define _OPERATOR_H_
#include "MgrBase.h"
#include "SimpleRefection.h"
struct FormulaEnv;
class Operator:public ReflectionBase
{
	DECL_REFLECTION(Operator,"../../config/Operator.xml");
public:
	int32			m_iID;
	std::string		m_sDisplayName;
	EEvaluationType m_eParam0;
	int32			m_iOperation0;

	EOperator		m_eOperator;

	EEvaluationType m_eParam1;
	int32			m_iOperation1;

	Operator * m_pOperator0;
	Operator * m_pOperator1;
	
	rewrite virtual void OnArchieveReaded();
	double Evaluate(const FormulaEnv& rEnv) const ;
	double CalParam(const FormulaEnv& rEnv,EEvaluationType eType,Operator * pOperator) const ;
private:
};
typedef DefMangerTpl<Operator> OperatorManager;

#endif